//
//  JSMLeavingMoreModel.m
//  TakeYouTourTogether
//
//  Created by dllo on 15/12/3.
//  Copyright © 2015年 king. All rights reserved.
//

#import "JSMLeavingMoreModel.h"
#import "JSMLeavingMoreProvinceModel.h"
@implementation JSMLeavingMoreModel
- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    if ([key isEqualToString:@"region"]) {
        self.regionStr = value;
    }
    if ([key isEqualToString:@"province"]) {
        self.provinceMarr = [NSMutableArray array];
        self.provinceMarr = [JSMLeavingMoreProvinceModel baseModelByArr:value];
    }
}

- (instancetype)initWithCoder:(NSCoder *)aDecoder {
    self = [super init];
    if (self) {
        self.regionStr = [aDecoder decodeObjectForKey:@"regionStr"];
        self.provinceMarr = [aDecoder decodeObjectForKey:@"provinceMarr"];
    }
    return self;
}

- (void)encodeWithCoder:(NSCoder *)aCoder {
    [aCoder encodeObject:self.regionStr forKey:@"regionStr"];
    [aCoder encodeObject:self.provinceMarr forKey:@"provinceMarr"];
}
@end
